﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShuJuGj.Entity;

namespace ShuJuGj
{
    public class AutoUpload
    {
        public static string Test()
        {
            Console.WriteLine("调用Test:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            return "";
        }

        /// <summary>
        /// 数据归集上传
        /// </summary>
        /// <returns></returns>
        public static string ShujugjUpload()
        {
            UploadService uploadService = new UploadService();
            try
            {
                uploadService.UploadData();
                return "";
            }
            catch (Exception ex)
            {
                return ex.ToString();
            }
        }

        /// <summary>
        /// 体检报告上传，根据已经上传的体检报告记录，上传体检报告PDF
        /// </summary>
        /// <returns></returns>
        public static string TjbgPdfUpload()
        {
            UploadService uploadService = new UploadService();
            try
            {
                uploadService.TjbgPdfUpload();
                return "";
            }
            catch (Exception ex)
            {
                return ex.ToString();
            }
        }
    }
}